/* personal-management.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --dark: #1d3557;
    --darker: #0d1b2a;
    --light: #f8f9fa;
    --gray: #8d99ae;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --card-bg: rgba(29, 53, 87, 0.8);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--light);
    min-height: 100vh;
    background-attachment: fixed;
    line-height: 1.6;
}

/* 主内容区样式 */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 个人管理页面样式 */
.personal-management {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.management-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.management-tab {
    padding: 1rem 2rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    color: var(--light);
    font-weight: 500;
}

.management-tab:hover {
    color: var(--accent);
}

.management-tab.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 个人资料样式 */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.avatar-container {
    position: relative;
    margin-right: 2rem;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
}

.avatar-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-info {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    color: var(--light);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.btn-save {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    background: var(--secondary);
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
}

.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--danger);
}

.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

/* 评论管理样式 */
.comment-list {
    display: grid;
    gap: 1.5rem;
}

.comment-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    transition: var(--transition);
}

.comment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.comment-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.comment-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.comment-content {
    color: var(--light);
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-item:hover, .pagination-item.active {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.pagination-item i {
    font-size: 1rem;
}

/* 收藏管理样式 */
.favorite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.favorite-item {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
}

.favorite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.favorite-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8) 90%);
    z-index: 1;
}

.favorite-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

.favorite-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.favorite-type {
    color: var(--gray);
    margin-bottom: 1rem;
}

.remove-favorite-btn {
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.remove-favorite-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* 日志管理样式 */
.log-list {
    display: grid;
    gap: 1.5rem;
}

.log-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    transition: var(--transition);
}

.log-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.log-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.log-meta {
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
}

.log-content {
    color: var(--light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.log-actions {
    display: flex;
    gap: 1rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: var(--darker);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--light);
    font-size: 1rem;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 星星评分样式 */
.stars {
    color: var(--warning);
    display: flex;
    gap: 5px;
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .favorite-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .avatar-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .management-tabs {
        flex-direction: column;
    }

    .management-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .management-tab.active {
        border-bottom: none;
        border-left-color: var(--accent);
    }

    .favorite-grid {
        grid-template-columns: 1fr;
    }

    .log-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .log-meta {
        flex-wrap: wrap;
    }

    .comment-actions,
    .log-actions {
        flex-direction: column;
    }
}